﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace CungMuaC5
{
    public partial class Company : System.Web.UI.MasterPage
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            HighlightSelectedMenuItem();
        }
        private void HighlightSelectedMenuItem()
        {
            string MyURL = Request.Url.AbsoluteUri;
            foreach (MenuItem mi in companyMenu.Items)
            {
                string mytest = System.IO.Path.GetFileName(mi.NavigateUrl);
                if (MyURL.Contains(mytest))
                {
                    mi.Selected = true;
                }
            }
        }
    }
}